package team.hyznrj.studentsys.service;

import java.io.IOException;
import java.util.Map;

import team.hyznrj.studentsys.entity.DataReport;
import team.hyznrj.studentsys.exception.AuthenticationOnFlagException;
import team.hyznrj.studentsys.exception.DataBaseObjectNull;
import team.hyznrj.studentsys.exception.DataBaseObjectRefuse;
import team.hyznrj.studentsys.exception.DataBaseOperationError;
import team.hyznrj.studentsys.exception.DataIllegalException;
import team.hyznrj.studentsys.exception.DataNullException;
/**
 * 必须值:
INSERT INTO `student_msg_map` VALUES ('1', '学号', '0', '1', '-1');
INSERT INTO `student_msg_map` VALUES ('2', '姓名', '0', '1', '-1');
INSERT INTO `student_msg_map` VALUES ('3', '学院', '0', '1', '-1');
INSERT INTO `student_msg_map` VALUES ('4', '专业', '0', '1', '-1');
INSERT INTO `student_msg_map` VALUES ('5', '班级', '0', '1', '-1');
 * @author 郑泽锋
 */
public interface StudentMsgMapService {
	
	/**
	 * 增加一个中文信息字段
	 * addMsg  
	 * @param value 中文值
	 * @param necessary 是否必须项
	 * @param flag 用户标志字段的前位
	 * @return String
	 * @throws DataNullException 
	 * @throws DataBaseOperationError 
	 * @throws AuthenticationOnFlagException 
	 */
	DataReport addMsg(String value,boolean necessary,String flag) throws DataNullException, DataBaseOperationError, AuthenticationOnFlagException;
	/**
	 * 更新一个中文信息字段(必须是可删除项才能修改)
	 * updateMsg  
	 * @param id
	 * @param value
	 * @param deleteAble
	 * @param necessary
	 * @param flag 
	 * @return String
	 * @throws DataNullException 
	 * @throws DataIllegalException 
	 * @throws DataBaseObjectNull 
	 * @throws DataBaseOperationError 
	 * @throws DataBaseObjectRefuse 
	 * @throws AuthenticationOnFlagException 
	 */
	DataReport updateMsg(String id,String value,boolean necessary,String flag) throws DataNullException, DataIllegalException, DataBaseObjectNull, DataBaseOperationError, DataBaseObjectRefuse, AuthenticationOnFlagException;
	/**
	 * 删除一个中文信息字段(必须是可删除项)
	 * deleteMsg  
	 * @param id
	 * @return String
	 * @throws DataBaseObjectNull 
	 * @throws DataBaseOperationError 
	 * @throws DataBaseObjectRefuse 
	 */
	DataReport deleteMsg(String id) throws DataBaseObjectNull, DataBaseOperationError, DataBaseObjectRefuse;
	/**
	 * 获取全部信息(预览),包括-1
	 * getAllMsg  
	 * @return
	 * @return DataReport
	 * @throws DataBaseObjectNull 
	 * @throws DataNullException 
	 * @throws AuthenticationOnFlagException 
	 */
	DataReport getAllMsg(String flag) throws DataBaseObjectNull, DataNullException, AuthenticationOnFlagException;
	/**
	 * 根据id获取单个信息(修改)
	 * getMsgById  
	 * @param id
	 * @return
	 * @return DataReport
	 * @throws DataIllegalException 
	 * @throws DataBaseObjectNull 
	 */
	DataReport getMsgById(String id) throws DataIllegalException, DataBaseObjectNull;
	/**
	 * 获取flag对应的文件映射Map
	 * eg:
	 * 学号->ef12
	 * 班级->ax49
	 * @param flag
	 * @return
	 */
	Map<String,String> getAllMsgIdMap(String flag);
	
	
}
